<!--{template common/header}-->
<!--{if !$_G[inajax]}-->
<div id="pt" class="bm cl">
	<div class="z">
		<a href="./" class="nvhm" title="{lang Homepage}">$_G[setting][sitename]</a> <em>&rsaquo;</em> 
		<a href="$_G[setting][navs][1][filename]">{lang Portal}</a> <em>&rsaquo;</em>
		<a href="index.php?option=portalcp">{lang Portal management}</a> <em>&rsaquo;</em>
		{lang Block management}
	</div>
</div>

<div class="main-inner1 clearfix">
<!--{ad/text/wp a_t}-->
<div id="ja-mainbody" style="width:820px; float: right;">
	<div id="ja-content-main" class="ja-content-main clearfix">
		<h1 class="mt">{lang Block management}</h1>
		<div class="bm bw0">
			<div id="block_selection">
<!--{/if}-->

<!--{if $op=='recommend'}-->
	<h3 class="flb">
		<em id="return_$_G[gp_handlekey]">{lang Push}</em>
		<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_G[gp_handlekey]');" class="flbc" title="{lang Close}">{lang Close}</a></span><!--{/if}-->
	</h3>
	<script type="text/javascript" src="{$_G[siteurl]}static/js/portal.js"></script>
	<form id="recommendform" method="post" enctype="multipart/form-data" action="index.php?option=block&op=recommend&id=$_GET[id]&idtype=$_GET[idtype]" onsubmit="if(recommenditem_check()) { ajaxpost('recommendform','return_$_G[gp_handlekey]','return_$_G[gp_handlekey]','onerror');} return false;">
		<div class="c">
			<table class="tfm"{if $_G[inajax]} width="400"{/if}>
				<tr>
					<th width="80">{lang Select block}</th>
					<td>
						<!--{subtemplate block/pageblock}-->
					</td>
				</tr>
				<tbody id="itemeditarea"></tbody>
			</table>
		</div>
		<p class="o pns">
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<input type="hidden" name="recommendsubmit" value="1" />
			<input type="hidden" name="handlekey" value="$_G['gp_handlekey']" />
			<input type="hidden" name="referer" value="$_G[referer]">
			<button type="submit" class="pn pnc" value="true"><strong>{lang Submit}</strong></button>
		</p>
	</form>
	<script type="text/javascript" reload="1">
		function errorhandle_recommenditem(message) {
			ajaxinnerhtml('itemeditarea', '<tr><td>&nbsp;</td><td>' + message + '</td></tr>');
		}
	</script>

<!--{elseif $op=='search'}-->
	<p>
		{lang Show only under the conditions of the search module.}<a href="index.php?option=block&task=portalblock" class="xi2">{lang Click to return to list page}</a>
	</p>
	<!--{if $blocks}-->
		<table class="dt mtm">
			<tr>
				<th>{lang Module identification}</th>
				<th>{lang Category}</th>
				<th>{lang Data sources}</th>
				<th>{lang in Page}</th>
				<th width="120">{lang Operation}</th>
			</tr>
			<!--{loop $blocks $block}-->
			<tr>
				<td><label for="push_bid_$block[bid]">$block[name]</label></td>
				<td>$block[blockclassname]</td>
				<td>$block[datasrc]</td>
				<td><!--{if $block[diyurl]}--><a href="$block[diyurl]" target="_blank">$block[tplname]</a><!--{else}-->$block[tplname]<!--{/if}--></td>
				<td>
					<!--{if $block['perm']['allowproperty']}-->
					<a href="index.php?option=block&op=block&bid=$block[bid]" target="_blank">{lang Property}</a>
					<!--{/if}-->
					<!--{if $block['perm']['allowdata']}-->
					<a href="index.php?option=block&op=data&bid=$block[bid]" target="_blank">{lang Data}</a>
					<!--{/if}-->
					<!--{if $block['isrecommendable']}-->
					<a href="index.php?option=block&task=blockdata&op=manage&searchkey=%23$block[bid]" target="_blank">{lang Audit}</a>
					<a href="index.php?option=block&op=itemdata&bid=$block[bid]" target="_blank">{lang Item data}</a>
					<!--{/if}-->
				</td>
			</tr>
			<!--{/loop}-->
		</table>
		<!--{if $multi}--><div class="pgs cl">$multi</div><!--{/if}-->
	<!--{else}-->
		<p class="emp">{lang There are no management modules}</p>
	<!--{/if}-->

<!--{else}-->
	<form action="index.php?option=block&task=portalblock&op=search" method="get" class="mbm">
		<input type="hidden" name="mod" value="portalcp" />
		<input type="hidden" name="ac" value="portalblock" />
		<input type="hidden" name="op" value="search" />
		{lang Module identification}:
		<input type="text" class="px vm" name="searchkey" id="searchkey" value="$_GET[searchkey]" />
		<button type="submit" class="pn vm"><em>{lang Find}</em></button>
	</form>
	<!--{if $pageblocks}-->
		<!--{loop $pageblocks $key $value}-->
		<div class="bm">
			<div class="bm_h"><h3><!--{if $diyurls[$key]}--><a href="$diyurls[$key]" target="_blank">$diytemplate[$key]</a><!--{else}-->$diytemplate[$key]<!--{/if}--></h3></div>
			<div class="bm_c">
				<ul class="xl xl2 ptblk cl">
					<!--{loop $value $bid}-->
					<li>
						<em>
							
							<!--{if $blocks[$bid]['perm']['allowproperty']}-->
							<a href="index.php?option=block&op=block&bid=$bid" target="_blank">{lang Property}</a>
							<span class="pipe">|</span>
							<!--{/if}-->
							<!--{if $blocks[$bid]['perm']['allowdata']}-->
							<a href="index.php?option=block&op=data&bid=$bid" target="_blank">{lang Data}</a>
							<!--{/if}-->
							<!--{if $blocks[$bid][isrecommendable]}-->
							<span class="pipe">|</span>
							<a href="index.php?option=block&task=blockdata&op=manage&searchkey=%23$bid" target="_blank">{lang Audit}</a>
							<span class="pipe">|</span>
							<a href="index.php?option=block&op=itemdata&bid=$bid" target="_blank">{lang Item data}</a>
							<!--{/if}-->
						</em>
						$blocks[$bid][name]
					</li>
					<!--{/loop}-->
				</ul>
			</div>
		</div>
		<!--{/loop}-->

		<!--{if $multi}--><div class="pgs cl">$multi</div><!--{/if}-->
	<!--{else}-->
		<p>{lang There are no management modules}</p>
	<!--{/if}-->
<!--{/if}-->

<!--{if !$_G[inajax]}-->
			</div>
		</div>
	</div>
</div>
	
<!--{subtemplate portalcp/nav}-->
<!--{/if}-->
<!--{template common/footer}-->